package com.zhengbing.tj.design.builder;

public class BuilderPatternDemo {
    public static void main(String[] args) {
        ConcreteBuilder builder = new ConcreteBuilder();
        
        Director director = new Director();
        director.setBuilder(builder);
        
        System.out.println("=== Building Full Product ===");
        director.construct();
        Product fullProduct = builder.getResult();
        fullProduct.show();
        
        builder = new ConcreteBuilder();
        director.setBuilder(builder);
        
        System.out.println("\n=== Building Basic Product ===");
        director.constructBasic();
        Product basicProduct = builder.getResult();
        basicProduct.show();
        
        System.out.println("\n=== Custom Building Product ===");
        builder = new ConcreteBuilder();
        builder.buildPartA();
        builder.buildPartC();
        Product customProduct = builder.getResult();
        customProduct.show();
    }
}